# -*- coding: utf-8 -*-
from __future__ import unicode_literals

class RegistrationsAdmin(object):
    list_display = ['reg_user', 'network_ip', 'network_port', 'url']
    list_display_links = [""] #禁用编辑
    list_per_page = 20
    search_fields = ['reg_user', 'network_ip']
    #object_list_template = "model_list.html"
    refresh_times=[3,5,10,15]
    def has_add_permission(self):
        return False
    def has_delete_permission(self):
        return False

    #def get_context(self):
    #    context = CommAdminView.get_context(self)
    #    results = ReadSql("select *,from_unixtime(expires) as expiresdate from registrations")
    #    context.update(
    #        {
    #            'title': '在线用户',
    #            'results':results,
    #        }
    #    )

     #   return context


